# -*- coding : utf-8 -*-
from urllib import request
url='http://www.baidu.com'
req=request.Request(url)
req.add_header('User-Agent','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 Edg/96.0.1054.53)')
response=request.urlopen(req)
result=response.read().decode('utf-8')
print(result)
